const webpack = require("webpack");
const marge = require("webpack-merge");
const baseConfig = require("./webpack.base.js");
const devConfig = {
  mode: "development", // 打包的入口
  devtool: "cheap-module-eval-source-map",
  // devServer配置
  devServer: {
    // 指定服务器根目录
    contentBase: "./dist", // 自动打开浏览器
    open: true,
    hot: true,
  },
  plugins: [new webpack.HotModuleReplacementPlugin()],
};
module.exports = marge(baseConfig, devConfig);
